import os
import platform
import sys

import torch
from icecream import ic
from rich import print

# 添加当前目录到Python路径
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
print("sys.path:", sys.path)
print(sys.version)

print(platform.architecture(), sys.version)
# print(torch.__version__)

import _C

ic(torch.ops.extension_cpp.mymul.default)  # 这个是函数
ic(dir(torch.ops.extension_cpp.mymul.default))

opOverLoad = torch.ops.extension_cpp.mymul.default

for key in dir(opOverLoad):
    print(f"{key} | {getattr(opOverLoad, key)}")
